﻿using System;
using TechTalk.SpecFlow;
using FluentAssertions;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Support;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;

namespace DocProcessingWorkFlowScenarios
{
    [Binding]
    public class BBOSValidUserLoginSteps
    {
        BBOS_LoginPage loginPage = new BBOS_LoginPage();
        BBOS_WelcomePage welcomePage = new BBOS_WelcomePage();

        [When]
        public void When_I_enter_BBOS_Admin_Username_of_USERNAME(string username)
        {
            loginPage.EnterUserName(username);
        }

        [When]
        public void When_I_enter_BBOS_Admin_Password_of_PASSWORD(string password)
        {
            loginPage.EnterPassword(password);
        }

        [When]
        public void When_I_have_permissions()
        {
        }

        [When]
        public void When_I_press_submit()
        {
            loginPage.ClickSubmit();
        }

        [Then]
        public void Then_Welcome_to_BBOS_page_displayed()
        {
            welcomePage.TimeWait();       
            welcomePage.WelcomeMessage();
            welcomePage.TimeWait();
        }
    }
}
